// 引入 request 文件
import {
	request,
	saveTraffic
} from '../index.js'

// 圈子添加文本
export const publishCircleApi = (params) => {
	return request({
		url: '/community/insertCommunity',
		method: 'post',
		data: params,
		header: {
			'Content-Type': 'application/json'
		}
	})
}

// 搜索圈子
export const searchCircleApi = (data) => {
	return request({
		url: "/community/getCommunity",
		data
	})
}
/* // 圈子添加图片
export const addCircleImg = (params) => {
	return request({
		url: '/community/insertCommunity',
		method: 'post',
		data: params,
		header: {
			'Content-Type': 'multipart/form-data'
		}
	})
} */

// 圈子列表
export const getCircleList = () => {
	return saveTraffic({
		url: '/community/getCommunity',
		method: 'get',
	});
}